<template>
  <div class="container HelpDetail-wrap">
    <div class="title">
      <span>{{helpData.title}}</span>
    </div>
    <div class="text" v-html="helpData.content">{{helpData.content}}</div>
  </div>
</template>

<script>
import { helpdetails } from "@/api/help";
export default {
  data() {
    return {
      helpData: {}
    };
  },
  created() {
    console.log(this.$route.query);
    if (this.$route.query.id) {
      let params = {
        id: this.$route.query.id
      };
      this.getHelpdetails(params);
    }
  },
  methods: {
    // 获取帮助详情
    getHelpdetails(params) {
      helpdetails(params).then(res => {
        console.log("帮助详情res", res);

        if (res.code == 1) {
          this.helpData = res.data;
        }
      });
    }
  }
};
</script>
<style lang="scss">
.HelpDetail-wrap {
  .text {
    p {
      img {
        width: 100%;
        margin-top: 15px;
      }
    }
  }
}
</style>

<style lang='scss' scoped>
.container {
  width: 100vw;
  min-height: 100vh;
  padding: 0 32px;
  padding-bottom: 32px;
  > .title {
    font-size: 34px;
    font-weight: 400;
    color: rgba(17, 17, 17, 1);
    padding: 40px 0;
    border-bottom: 1px solid #f2f2f2;
    text-align: left;
  }
  > .text {
    line-height: 55px;
    padding-top: 40px;
    font-size: 30px;
    text-align: justify;
    font-family: PingFang SC;
    font-weight: 400;
    color: rgba(51, 51, 51, 1);
  }
}
</style>
